﻿using System;
using System.Reflection;

namespace IInject.Reflection
{
	public class Parameter : ReflectionWrapper<ParameterInfo>
	{
		public Parameter(ParameterInfo parameterInfo) : base(parameterInfo)
		{
		}

		public override string Name
		{
			get
			{
				return WrappedItem.Name;
			}
		}

		public int Position
		{
			get
			{
				return WrappedItem.Position;
			}
		}

		public override Type Type
		{
			get
			{
				return WrappedItem.ParameterType;
			}
		}

		public MethodBase OwningMethod
		{
			get
			{
				return (MethodBase)WrappedItem.Member;
			}
		}

		public object Value { get; set; }
	}
}
